﻿using System;
using System.Collections.Generic;

namespace XFSale.Lib
{
    using DictValueList = List<DictValue>;

    public class DictValue : ICloneable
    {
        public string itemValue;
        public int valueOrder;
        public string valueDesc;

        public object Clone()
        {
            DictValue value = new DictValue();
            value.itemValue = itemValue;
            value.valueOrder = valueOrder;
            value.valueDesc = valueDesc;
            return value;
        }
    };

    public class DictMeta
    {
        public int itemID;
        public string itemName;
        public string itemType;
        public int itemScale;
        public int itemPrecise;
        public string itemDesc;
        public string itemClass;
        public string itemVerify;
        public string itemDefault;
        public string fieldName;
        public DictValueList valueItems;

        public DictMeta()
        {
            valueItems = new DictValueList();
        }

        public int itemLen
        {
            get { return itemScale + 1; }
        }
    }
}
